#ifndef __UARTDMARECV_PROC_H__
#define __UARTDMARECV_PROC_H__

#include "stm32f4xx_hal.h"
#include "stm32f4xx_it.h"
#include "cmsis_os.h"

#define UART_BUF_SIZE	64

typedef struct _UartProcInfo {
	UART_HandleTypeDef *huart_dst;
	osMessageQId RcvDoneMsgQueueHandle;
	uint32_t u32RecvCnt;	
	uint8_t *pu8RecvBuf;
	const uint32_t cu32RecvBufSize;
} UartProcInfo;

uint8_t InitUartProcInfo(UartProcInfo *uart_procinfo, UART_HandleTypeDef *huart, uint32_t u32RcvBufSz, uint8_t *p8RcvBuf, osMessageQId RcvDoneMsg);
void UartDMAISR(UART_HandleTypeDef *huart_src, UartProcInfo *uart_procinfo);

extern UartProcInfo uart1RcvItInfo;
extern UartProcInfo uart4RcvItInfo;
#endif
